package com.lizhi.yun.system.stand.controller;/**
 * @program: sfrobot-html
 * @name StandAppointController
 * @description:
 * @author: lizhi
 * @create: 2020-05-26 18:01
 */

import com.lizhi.common.yun.entity.ListResponseResult;
import com.lizhi.yun.system.stand.handler.StandAppointHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 *@program: sfrobot-html
 *@name StandAppointController
 *@description: 康复预约
 *@author: lizhi
 *@create: 2020-05-26 18:01
 */
@RestController
@RequestMapping(path = "/api/stand/yun/appoint")
@Api("康复预约")
public class StandAppointController {

    @Resource
    private StandAppointHandler standAppointHandler;

    @ApiOperation("通过map查询康复预约信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "map", value = "map传参", required = false, dataType = "Map", paramType = "query"),
            @ApiImplicitParam(name = "pageIndex", value = "当前页", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "pageSize", value = "展示条数", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "userAcct", value = "当前登录账号", required = true, dataType = "String", paramType = "query")
    })
    @PostMapping(path = "/doMain")
    public ListResponseResult doMain(@RequestParam Map<String, Object> map, HttpServletRequest request){
        return standAppointHandler.doMain(map, request);
    }

    @ApiOperation("通过appointId查询康复预约信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "appointId", value = "预约id", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "hospitalId", value = "医院id", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "hospitalSystemId", value = "系统id", required = true, dataType = "String", paramType = "query")
    })
    @PostMapping(path = "/selectById")
    public ListResponseResult selectById(String appointId, String hospitalId, String hospitalSystemId){
        return standAppointHandler.selectById(appointId, hospitalId, hospitalSystemId);
    }

}
